<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位与浮动区别</title>
    <style>
        .box1{
            width: 200px;
            height: 200px;
            background: yellow;
            float: left;
            /* position: absolute; */
        }
        .box2{
            width: 300px;
            height: 300px;
            background: red;

        }
        /* 
        1.float:半脱离，文字环绕
        2.absolute：全脱离，不会出现文字环绕效果
        */
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Totam libero sapiente nostrum, aliquid, eligendi, autem minus id sed optio assumenda incidunt ipsa nemo. Similique facilis asperiores, sit debitis consequuntur ullam.</div>
</body>
</html>